package com.llongwill.slg.gateway.common;

import com.google.common.collect.Sets;
import org.springframework.core.Ordered;

import java.util.Set;

/**
 * 网关相关常量
 *
 * @author xiangff
 */
public class GatewayConstants {
    public static final String SGL_USERID = "sgl-userid";
    public static final String KEYS_SCHOOL_ID = "SCHOOL_ID";
    public static final String KEYS_SCHOOL_NAME = "SCHOOL_NAME";

    private static int FILTER_INDEX_ST = Ordered.HIGHEST_PRECEDENCE;

    public enum GaWebFilterEnum {

        TRACE(0), REQ_SECURE(1), ACCESS_LOG(2), EXCEPTION(3);

        private int index;

        public int getIndex() {
            return FILTER_INDEX_ST + this.index;
        }

        GaWebFilterEnum(int index) {
            this.index = index;
        }
    }

    public static final Set<String> IGNORE_URL = Sets.newHashSet(

    );

}
